home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Tools - Objects / MacApp / MacApp 3.0a2 / CPlusIncludes / GestaltEqu.h < prev    next >
Text File  |  1991-05-01  |  13KB  |  335 lines

  1. /************************************************************
  2.  
  3. Created: Sunday, January 6, 1991 at 9:27 PM
  4.     GestaltEqu.h
  5.     C Interface to the Macintosh Libraries
  6.  
  7.  
  8.         Copyright Apple Computer, Inc.    1988-1990
  9.         All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13.  
  14. #ifndef __GESTALTEQU__
  15. #define __GESTALTEQU__
  16.  
  17. #ifndef __TYPES__
  18. #include <Types.h>
  19. #endif
  20.  
  21.  
  22. enum {
  23.  
  24.  
  25. /************************
  26.  *    Gestalt error codes
  27.  ************************/
  28.     gestaltUnknownErr = -5550,              /* value returned if Gestalt doesn't know the answer */
  29.     gestaltUndefSelectorErr = -5551,        /* undefined selector was passed to Gestalt */
  30.     gestaltDupSelectorErr = -5552,          /* tried to add an entry that already existed */
  31.     gestaltLocationErr = -5553,             /* gestalt function ptr wasn't in sysheap */
  32.  
  33. /**************************
  34.  *    Environment Selectors
  35.  **************************/
  36.  
  37. #define gestaltVersion 'vers'               /* gestalt version */
  38. #define gestaltAddressingModeAttr 'addr'    /* addressing mode attributes */
  39.  
  40.     gestalt32BitAddressing = 0,             /* using 32-bit addressing mode */
  41.     gestalt32BitSysZone = 1,                /* 32-bit compatible system zone */
  42.     gestalt32BitCapable = 2,                /* Machine is 32-bit capable */
  43.  
  44. #define gestaltAliasMgrAttr 'alis'          /* Alias Mgr Attributes */
  45.  
  46.     gestaltAliasMgrPresent = 0,             /* True if the Alias Mgr is present */
  47.  
  48. #define gestaltAppleTalkVersion 'atlk'      /* appletalk version */
  49. #define gestaltAUXVersion 'a/ux'            /*a/ux version, if present */
  50. #define gestaltConnMgrAttr 'conn'           /* connection mgr attributes    */
  51.  
  52.     gestaltConnMgrPresent = 0,
  53.     gestaltConnMgrCMSearchFix = 1,          /* Fix to CMAddSearch?     */
  54.  
  55. #define gestaltCRMAttr 'crm '               /* comm resource mgr attributes */
  56.  
  57.     gestaltCRMPresent = 0,
  58.  
  59. #define gestaltCTBVersion 'ctbv'            /* CommToolbox version */
  60. #define gestaltDBAccessMgrAttr 'dbac'       /* Database Access Mgr attributes */
  61.  
  62.     gestaltDBAccessMgrPresent = 0,          /* True if Database Access Mgr present */
  63.  
  64. #define gestaltDITLExtAttr 'ditl'           /* AppenDITL, etc. calls from CTB */
  65.  
  66.     gestaltDITLExtPresent = 0,              /* True if calls are present */
  67.  
  68. #define gestaltEasyAccessAttr 'easy'        /* Easy Access attributes */
  69.  
  70.     gestaltEasyAccessOff = 0,               /* if Easy Access present, but off (no icon) */
  71.     gestaltEasyAccessOn = 1,                /* if Easy Access "On" */
  72.     gestaltEasyAccessSticky = 2,            /* if Easy Access "Sticky" */
  73.     gestaltEasyAccessLocked = 3,            /* if Easy Access "Locked" */
  74.  
  75. #define gestaltEditionMgrAttr 'edtn'        /* Edition Mgr attributes */
  76.  
  77.     gestaltEditionMgrPresent = 0,           /* True if Edition Mgr present */
  78.  
  79. #define gestaltAppleEventsAttr 'evnt'       /* Apple Events attributes */
  80.  
  81.     gestaltAppleEventsPresent = 0,          /* True if Apple Events present */
  82.  
  83. #define gestaltFindFolderAttr 'fold'        /* Folder Mgr attributes */
  84.  
  85.     gestaltFindFolderPresent = 0            /* True if Folder Mgr present */
  86. };
  87. enum {
  88.  
  89. #define gestaltFontMgrAttr 'font'           /* Font Mgr attributes */
  90.  
  91.     gestaltOutlineFonts = 0,                /* True if Outline Fonts supported */
  92.  
  93. #define gestaltFPUType 'fpu '               /* fpu type */
  94.  
  95.     gestaltNoFPU = 0,                       /* no FPU */
  96.     gestalt68881 = 1,                       /* 68881 FPU */
  97.     gestalt68882 = 2,                       /* 68882 FPU */
  98.     gestalt68040FPU = 3,                    /* 68040 built-in FPU */
  99.  
  100. #define gestaltFSAttr 'fs  '                /* file system attributes */
  101.  
  102.     gestaltFullExtFSDispatching = 0,        /* has really cool new HFSDispatch dispatcher */
  103.     gestaltHasFSSpecCalls = 1,              /* has FSSpec calls    */
  104.     gestaltHasFileSystemManager = 2,        /* has a file system manager */
  105.  
  106. #define gestaltFXfrMgrAttr 'fxfr'           /* file transfer manager attributes */
  107.  
  108.     gestaltFXfrMgrPresent = 0,
  109.  
  110. #define gestaltHardwareAttr 'hdwr'          /* hardware attributes */
  111.  
  112.     gestaltHasVIA1 = 0,                     /* VIA1 exists */
  113.     gestaltHasVIA2 = 1,                     /* VIA2 exists */
  114.     gestaltHasASC = 3,                      /* Apple Sound Chip exists */
  115.     gestaltHasSCC = 4,                      /* SCC exists */
  116.     gestaltHasSCSI = 7,                     /* SCSI exists */
  117.     gestaltHasSoftPowerOff = 19,            /* Capable of software power off */
  118.  
  119. #define gestaltHelpMgrAttr 'help'           /* Help Mgr Attributes */
  120.  
  121.     gestaltHelpMgrPresent = 0,              /* true if help mgr is present */
  122.  
  123. #define gestaltKeyboardType 'kbd '          /* keyboard type */
  124.  
  125.     gestaltMacKbd = 1,
  126.     gestaltMacAndPad = 2,
  127.     gestaltMacPlusKbd = 3,
  128.     gestaltExtADBKbd = 4
  129. };
  130. enum {
  131.     gestaltStdADBKbd = 5,
  132.     gestaltPrtblADBKbd = 6,
  133.     gestaltPrtblISOKbd = 7,
  134.     gestaltStdISOADBKbd = 8,
  135.     gestaltExtISOADBKbd = 9,
  136.     gestaltADBKbdII = 10,
  137.     gestaltADBISOKbdII = 11,
  138.  
  139. #define gestaltLowMemorySize 'lmem'         /* size of low memory area */
  140. #define gestaltLogicalRAMSize 'lram'        /* logical ram size */
  141. #define gestaltMiscAttr 'misc'              /* miscellaneous attributes */
  142.  
  143.     gestaltScrollingThrottle = 0,           /* true if scrolling throttle on */
  144.     gestaltSquareMenuBar = 2,               /* true if menu bar is square */
  145.  
  146. #define gestaltMMUType 'mmu '               /* mmu type */
  147.  
  148.     gestaltNoMMU = 0,                       /* no MMU */
  149.     gestaltAMU = 1,                         /* address management unit */
  150.     gestalt68851 = 2,                       /* 68851 PMMU */
  151.     gestalt68030MMU = 3,                    /* 68030 built-in MMU */
  152.     gestalt68040MMU = 4,                    /* 68040 built-in MMU */
  153.  
  154. #define gestaltStdNBPAttr 'nlup'            /* standard nbp attributes */
  155.  
  156.     gestaltStdNBPPresent = 0,
  157.  
  158. #define gestaltNotificationMgrAttr 'nmgr'   /* notification manager attributes */
  159.  
  160.     gestaltNotificationPresent = 0,         /* notification manager exists */
  161.  
  162. #define gestaltNuBusConnectors 'sltc'       /* bitmap of NuBus connectors*/
  163. #define gestaltOSAttr 'os  '                /* o/s attributes */
  164.  
  165.     gestaltSysZoneGrowable = 0,             /* system heap is growable */
  166.     gestaltLaunchCanReturn = 1,             /* can return from launch */
  167.     gestaltLaunchFullFileSpec = 2,          /* can launch from full file spec */
  168.     gestaltLaunchControl = 3                /* launch control support available */
  169. };
  170. enum {
  171.     gestaltTempMemSupport = 4,              /* temp memory support */
  172.     gestaltRealTempMemory = 5,              /* temp memory handles are real */
  173.     gestaltTempMemTracked = 6,              /* temporary memory handles are tracked */
  174.     gestaltIPCSupport = 7,                  /* IPC support is present */
  175.     gestaltSysDebuggerSupport = 8,          /* system debugger support is present */
  176.  
  177. #define gestaltOSTable 'ostt'               /*  OS trap table base  */
  178. #define gestaltToolboxTable 'tbtt'          /*  OS trap table base  */
  179. #define gestaltExtToolboxTable 'xttt'       /* Extended Toolbox trap table base */
  180. #define gestaltLogicalPageSize 'pgsz'       /* logical page size */
  181. #define gestaltPowerMgrAttr 'powr'          /* power manager attributes */
  182.  
  183.     gestaltPMgrExists = 0,
  184.     gestaltPMgrCPUIdle = 1,
  185.     gestaltPMgrSCC = 2,
  186.     gestaltPMgrSound = 3,
  187.  
  188. #define gestaltPPCToolboxAttr 'ppc '        /* PPC toolbox attributes */
  189.  
  190. /*
  191.  * PPC will return the combination of following bit fields.
  192.  * e.g. gestaltPPCSupportsRealTime +gestaltPPCSupportsIncoming + gestaltPPCSupportsOutGoing
  193.  * indicates PPC is cuurently is only supports real time delivery
  194.  * and both incoming and outgoing network sessions are allowed.
  195.  * By default local real time delivery is supported as long as PPCInit has been called.*/
  196.  
  197.  
  198.     gestaltPPCToolboxPresent = 0x0000,      /* PPC Toolbox is present  Requires PPCInit to be called */
  199.     gestaltPPCSupportsRealTime = 0x1000,    /* PPC Supports real-time delivery */
  200.     gestaltPPCSupportsIncoming = 0x0001,    /* PPC will deny incoming network requests */
  201.     gestaltPPCSupportsOutGoing = 0x0002,    /* PPC will deny outgoing network requests */
  202.  
  203. #define gestaltProcessorType 'proc'         /* processor type */
  204.  
  205.     gestalt68000 = 1,
  206.     gestalt68010 = 2,
  207.     gestalt68020 = 3,
  208.     gestalt68030 = 4,
  209.     gestalt68040 = 5,
  210.  
  211. #define gestaltParityAttr 'prty'            /* parity attributes */
  212.  
  213.     gestaltHasParityCapability = 0,         /* has ability to check parity */
  214.     gestaltParityEnabled = 1                /* parity checking enabled */
  215. };
  216. enum {
  217.  
  218. #define gestaltQuickdrawVersion 'qd  '      /* quickdraw version */
  219.  
  220.     gestaltOriginalQD = 0x000,              /* original 1-bit QD */
  221.     gestalt8BitQD = 0x100,                  /* 8-bit color QD */
  222.     gestalt32BitQD = 0x200,                 /* 32-bit color QD */
  223.     gestalt32BitQD11 = 0x210,               /* 32-bit color QDv1.1 */
  224.     gestalt32BitQD12 = 0x220,               /* 32-bit color QDv1.2 */
  225.     gestalt32BitQD13 = 0x230,               /* 32-bit color QDv1.3 */
  226.  
  227. #define gestaltQuickdrawFeatures 'qdrw'     /* quickdraw features */
  228.  
  229.     gestaltHasColor = 0,                    /* color quickdraw present */
  230.     gestaltHasDeepGWorlds = 1,              /* GWorlds can be deeper than 1-bit */
  231.     gestaltHasDirectPixMaps = 2,            /* PixMaps can be direct (16 or 32 bit) */
  232.     gestaltHasGrayishTextOr = 3,            /* supports text mode grayishTextOr */
  233.  
  234. #define gestaltPhysicalRAMSize 'ram '       /* physical RAM size */
  235. #define gestaltPopupAttr 'pop!'             /* popup cdef attributes */
  236.  
  237.     gestaltPopupPresent = 0,
  238.  
  239. #define gestaltResourceMgrAttr 'rsrc'       /* Resource Mgr attributes */
  240.  
  241.     gestaltPartialRsrcs = 0,                /* True if partial resources exist */
  242.  
  243. #define gestaltScriptMgrVersion 'scri'      /* Script Manager version number    <08/05/89 pke> */
  244. #define gestaltScriptCount 'scr#'           /* number of active script systems    <08/05/89 pke> */
  245. #define gestaltSerialAttr 'ser '            /* Serial attributes */
  246.  
  247.     gestaltHasGPIaToDCDa = 0,               /* GPIa connected to DCDa*/
  248.     gestaltHasGPIaToRTxCa = 1,              /* GPIa connected to RTxCa clock input*/
  249.     gestaltHasGPIbToDCDb = 2,               /* GPIb connected to DCDb */
  250.  
  251. #define gestaltSoundAttr 'snd '             /* sound attributes */
  252.  
  253.     gestaltStereoCapability = 0,            /* sound hardware has stereo capability */
  254.     gestaltStereoMixing = 1,                /* stereo mixing on external speaker */
  255.     gestaltSoundIOMgrPresent = 3,           /* The Sound I/O Manager is present */
  256.     gestaltBuiltInSoundInput = 4            /* built-in Sound Input hardware is present */
  257. };
  258. enum {
  259.     gestaltHasSoundInputDevice = 5,         /* Sound Input device available */
  260.  
  261. #define gestaltStandardFileAttr 'stdf'      /* Standard File attributes */
  262.  
  263.     gestaltStandardFile58 = 0,              /* True if selectors 5-8 (StandardPutFile-CustomGetFile) are supported */
  264.  
  265. #define gestaltTextEditVersion 'te  '       /* TextEdit version number            <08/05/89 pke> */
  266.  
  267.     gestaltTE1 = 1,                         /* TextEdit in MacIIci ROM <8Aug89smb> */
  268.     gestaltTE2 = 2,                         /* TextEdit with 6.0.4 Script Systems on MacIIci (Script bug fixes for MacIIci) <8Aug89smb> */
  269.     gestaltTE3 = 3,                         /* TextEdit with 6.0.4 Script Systems all but MacIIci <8Aug89smb> */
  270.     gestaltTE4 = 4,                         /* TextEdit in System 7.0 */
  271.     gestaltTE5 = 5,                         /* TextWidthHook available in TextEdit */
  272.  
  273. #define gestaltTermMgrAttr 'term'           /* terminal mgr attributes */
  274.  
  275.     gestaltTermMgrPresent = 0,
  276.  
  277. #define gestaltTimeMgrVersion 'tmgr'        /* time mgr version */
  278.  
  279.     gestaltStandardTimeMgr = 1,             /* standard time mgr is present */
  280.     gestaltRevisedTimeMgr = 2,              /* revised time mgr is present */
  281.     gestaltExtendedTimeMgr = 3,             /* extended time mgr is present */
  282.  
  283. #define gestaltVMAttr 'vm  '                /* virtual memory attributes */
  284.  
  285.     gestaltVMPresent = 0,                   /* true if virtual memory is present */
  286.  
  287. /*************************
  288.  *    Info-only selectors
  289.  ************************/
  290.  
  291. #define gestaltMachineType 'mach'           /* machine type */
  292.  
  293.     kMachineNameStrID = -16395,
  294.     gestaltClassic = 1,
  295.     gestaltMacXL = 2,
  296.     gestaltMac512KE = 3,
  297.     gestaltMacPlus = 4,
  298.     gestaltMacSE = 5,
  299.     gestaltMacII = 6,
  300.     gestaltMacIIx = 7
  301. };
  302. enum {
  303.     gestaltMacIIcx = 8,
  304.     gestaltMacSE030 = 9,
  305.     gestaltPortable = 10,
  306.     gestaltMacIIci = 11,
  307.     gestaltMacIIfx = 13,
  308.     gestaltMacClassic = 17,
  309.     gestaltMacIIsi = 18,
  310.     gestaltMacLC = 19
  311.  
  312. #define gestaltMachineIcon 'micn'           /* machine icon */
  313. #define gestaltROMSize 'rom '               /* rom size */
  314. #define gestaltROMVersion 'romv'            /* rom version */
  315. #define gestaltSystemVersion 'sysv'         /* system version*/
  316. };
  317.  
  318. #ifdef __cplusplus
  319. extern "C" {
  320. #endif
  321. #if SystemSevenOrLater
  322. #pragma parameter __D0 Gestalt(__D0,__A1)
  323. pascal OSErr Gestalt(OSType selector,long& response)
  324.     = {0xA1AD,0x2288}; 
  325. #else
  326. pascal OSErr Gestalt(OSType selector,long& response);
  327. #endif
  328. pascal OSErr NewGestalt(OSType selector,ProcPtr gestaltFunction); 
  329. pascal OSErr ReplaceGestalt(OSType selector,ProcPtr gestaltFunction,ProcPtr& oldGestaltFunction); 
  330. #ifdef __cplusplus
  331. }
  332. #endif
  333.  
  334. #endif
  335.